Skip to content

Commit

Permalink
Merge pull request #264 from ttngu207/datajoint_pipeline_pyrat
Browse files Browse the repository at this point in the history
modify `subject` schema to align with pyrat - added pyrat sync routine
  • Loading branch information
JaerongA authored Oct 27, 2023
2 parents 3930229 + cc06eca commit fee824a
Show file tree
Hide file tree
Showing 3 changed files with 354 additions and 88 deletions.
6 changes: 3 additions & 3 deletions aeon/dj_pipeline/lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class UserRole(dj.Lookup):
@schema
class User(dj.Lookup):
definition = """
user : varchar(32)
user : varchar(32) # swc username
---
user_email='' : varchar(128)
user_cellphone='' : varchar(32)
responsible_owner='' : varchar(32) # pyrat username
responsible_id='' : varchar(32) # pyrat `responsible_id`
"""


Expand Down
17 changes: 15 additions & 2 deletions aeon/dj_pipeline/populate/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datajoint_utilities.dj_worker import DataJointWorker, ErrorLog, WorkerLog
from datajoint_utilities.dj_worker.worker_schema import is_djtable

from aeon.dj_pipeline import acquisition, analysis, db_prefix, qc, report, tracking
from aeon.dj_pipeline import subject, acquisition, analysis, db_prefix, qc, report, tracking
from aeon.dj_pipeline.utils import load_metadata, streams_maker

streams = streams_maker.main()
Expand Down Expand Up @@ -95,7 +95,20 @@ def ingest_environment_visits():
mid_priority(report.ExperimentTimeDistribution)
mid_priority(report.VisitDailySummaryPlot)

# ---- Define worker(s) ----
# configure a worker to handle pyrat sync
pyrat_worker = DataJointWorker(
"pyrat_worker",
worker_schema_name=worker_schema_name,
db_prefix=db_prefix,
run_duration=-1,
sleep_duration=1200,
)

pyrat_worker(subject.CreatePyratIngestionTask)
pyrat_worker(subject.PyratIngestion)
pyrat_worker(subject.SubjectDetail)
pyrat_worker(subject.PyratCommentWeightProcedure)

# configure a worker to ingest all data streams
streams_worker = DataJointWorker(
"streams_worker",
Expand Down
Loading

0 comments on commit fee824a

Please sign in to comment.