-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
The syncing DB connections, as described in Import API are POSTs with JSON content to "/api/v1/synchronizations" where both connector and interval are defined. Also, actually there are null data import urls (archive) there.
The code in datasets.py does not allow to do this:
def is_sync_table(self, archive, interval, **import_args):
return (hasattr(archive, "startswith") and archive.startswith("http")
or "connection" in import_args) # this is true for DB connections
and interval is not None # this also is true for syncing connections
def create(self, archive, interval=None, **import_args):
# ...
if self.is_sync_table(archive, interval, **import_args): # true for syncing DB connection
manager = SyncTableJobManager(self.client)
else:
manager = FileImportJobManager(self.client)
if interval is None:
import_job = manager.create(archive) # different signature for different managers (out of this issue)
import_job.run(**import_args)
else:
import_job = manager.create(archive, interval) # this is called for SyncTableJobManager
# !!! import_args (including "connection") are just ignored and not POSTed later
# ...Metadata
Metadata
Assignees
Labels
No labels