This task assumes the user has a Census sync already configured and is attempting to orchestrate the sync using Prefect task to send a post to the API within a prefect flow. Copy and paste from the api trigger section on the configuration page in the api_trigger param to set a default sync.
Args:
api_trigger (str, optional): default sync to trigger, if none is specified in run
**kwargs (dict, optional): additional kwargs to pass to the base Task constructor
An invocation of run will attempt to start a sync job for the specified api_trigger. run will poll Census for the sync status, and will only complete when the sync has completed or when it receives an error status code from the trigger API call.
Args:
api_trigger (str): if not specified in run, it will pull from the default for the CensusSyncTask constructor. Keyword argument.
poll_status_every_n_seconds (int, optional): this task polls the Census API for the sync's status. If provided, this value will override the default polling time of 60 seconds and it has a minimum wait time of 5 seconds. Keyword argument.
Returns:
dict: dictionary of statistics returned by Census on the specified sync, structure below.