Beispiel #1
0
def start_compute_attributes(revision_ids=None, event_id=None):
  """Start a background task for computed attributes."""
  background_task.create_lightweight_task(
      name="compute_attributes",
      url=flask.url_for(compute_attributes.__name__),
      parameters={"revision_ids": revision_ids, "event_id": event_id},
      method="POST",
      queued_callback=compute_attributes
  )
Beispiel #2
0
def start_compute_attributes(revision_ids=None, event_id=None):
  """Start a background task for computed attributes."""
  background_task.create_lightweight_task(
      name="compute_attributes",
      url=url_for(compute_attributes.__name__),
      parameters={"revision_ids": revision_ids, "event_id": event_id},
      method="POST",
      queued_callback=compute_attributes
  )
Beispiel #3
0
def start_update_cad_related_objs(event_id, model_name, need_revisions=None):
  """Start a background task to update related objects of CAD."""
  background_task.create_lightweight_task(
      name="update_cad_related_objects",
      url=flask.url_for(update_cad_related_objects.__name__),
      parameters={
          "event_id": event_id,
          "model_name": model_name,
          "modified_by_id": login.get_current_user_id(),
          "need_revisions": need_revisions,
      },
      method="POST",
      queued_callback=update_cad_related_objects
  )