sub/pub to deployment channel
This commit is contained in:
		
							parent
							
								
									46e1f42961
								
							
						
					
					
						commit
						89bc1ca87d
					
				| @ -28,5 +28,5 @@ def deploy(deployment_id: UUID): | |||||||
|     ) |     ) | ||||||
|     deploy.save() |     deploy.save() | ||||||
| 
 | 
 | ||||||
|     send_event("test", "message", {"id": deploy.id, "status": deploy.status}) |     send_event("deployment", "message", {"id": deploy.id, "status": deploy.status}) | ||||||
|     print("event sent") |     print("event sent") | ||||||
|  | |||||||
| @ -8,5 +8,10 @@ urlpatterns = [ | |||||||
|     path("create", create, name="deployment-create"), |     path("create", create, name="deployment-create"), | ||||||
|     path("<uuid:deployment_id>", details, name="deployment-details"), |     path("<uuid:deployment_id>", details, name="deployment-details"), | ||||||
|     path("<uuid:deployment_id>/deploy", deploy, name="deployment-launch"), |     path("<uuid:deployment_id>/deploy", deploy, name="deployment-launch"), | ||||||
|     path("events/", include(django_eventstream.urls), {"channels": ["test"]}), |     path( | ||||||
|  |         "events/", | ||||||
|  |         include(django_eventstream.urls), | ||||||
|  |         {"channels": ["deployment"]}, | ||||||
|  |         name="deployment-events", | ||||||
|  |     ), | ||||||
| ] | ] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user