langchain-trigger-server 0.2.4__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langchain-trigger-server might be problematic. Click here for more details.
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/PKG-INFO +1 -1
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/cron_manager.py +4 -21
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/pyproject.toml +1 -1
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/.github/workflows/release.yml +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/.vscode/settings.json +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/README.md +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/__init__.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/app.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/core.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/database/__init__.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/database/interface.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/database/supabase.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/decorators.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/triggers/__init__.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/triggers/cron_trigger.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/test_framework.py +0 -0
- {langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-trigger-server
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Generic event-driven triggers framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/langchain-ai/open-agent-platform
|
|
6
6
|
Project-URL: Repository, https://github.com/langchain-ai/open-agent-platform
|
{langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/cron_manager.py
RENAMED
|
@@ -43,7 +43,6 @@ class CronTriggerManager:
|
|
|
43
43
|
try:
|
|
44
44
|
self.scheduler.start()
|
|
45
45
|
await self._load_existing_registrations()
|
|
46
|
-
logger.info("✓ CronTriggerManager started")
|
|
47
46
|
except Exception as e:
|
|
48
47
|
logger.error(f"Failed to start CronTriggerManager: {e}")
|
|
49
48
|
raise
|
|
@@ -52,7 +51,6 @@ class CronTriggerManager:
|
|
|
52
51
|
"""Shutdown scheduler gracefully."""
|
|
53
52
|
try:
|
|
54
53
|
self.scheduler.shutdown(wait=True)
|
|
55
|
-
logger.info("✓ CronTriggerManager stopped")
|
|
56
54
|
except Exception as e:
|
|
57
55
|
logger.error(f"Error shutting down CronTriggerManager: {e}")
|
|
58
56
|
|
|
@@ -69,8 +67,6 @@ class CronTriggerManager:
|
|
|
69
67
|
scheduled_count += 1
|
|
70
68
|
except Exception as e:
|
|
71
69
|
logger.error(f"Failed to schedule existing cron job {registration.get('id')}: {e}")
|
|
72
|
-
|
|
73
|
-
logger.info(f"Loaded {scheduled_count} existing cron registrations from {len(registrations)} total")
|
|
74
70
|
|
|
75
71
|
except Exception as e:
|
|
76
72
|
logger.error(f"Failed to load existing cron registrations: {e}")
|
|
@@ -84,8 +80,7 @@ class CronTriggerManager:
|
|
|
84
80
|
|
|
85
81
|
# Reload from database
|
|
86
82
|
await self._load_existing_registrations()
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
|
|
89
84
|
except Exception as e:
|
|
90
85
|
logger.error(f"Failed to reload cron jobs from database: {e}")
|
|
91
86
|
raise
|
|
@@ -95,7 +90,6 @@ class CronTriggerManager:
|
|
|
95
90
|
if registration.get("trigger_template_id") == CRON_TRIGGER_ID:
|
|
96
91
|
try:
|
|
97
92
|
await self._schedule_cron_job(registration)
|
|
98
|
-
logger.info(f"Scheduled new cron job for registration {registration['id']}")
|
|
99
93
|
except Exception as e:
|
|
100
94
|
logger.error(f"Failed to schedule new cron job {registration['id']}: {e}")
|
|
101
95
|
raise
|
|
@@ -104,7 +98,6 @@ class CronTriggerManager:
|
|
|
104
98
|
"""Called when a cron registration is deleted."""
|
|
105
99
|
try:
|
|
106
100
|
await self._unschedule_cron_job(registration_id)
|
|
107
|
-
logger.info(f"Unscheduled cron job for deleted registration {registration_id}")
|
|
108
101
|
except Exception as e:
|
|
109
102
|
logger.error(f"Failed to unschedule cron job {registration_id}: {e}")
|
|
110
103
|
|
|
@@ -145,10 +138,9 @@ class CronTriggerManager:
|
|
|
145
138
|
max_instances=1, # Prevent overlapping executions
|
|
146
139
|
replace_existing=True
|
|
147
140
|
)
|
|
148
|
-
|
|
141
|
+
|
|
149
142
|
self.active_jobs[registration_id] = job.id
|
|
150
|
-
|
|
151
|
-
|
|
143
|
+
|
|
152
144
|
except Exception as e:
|
|
153
145
|
logger.error(f"Failed to schedule cron job for registration {registration_id}: {e}")
|
|
154
146
|
raise
|
|
@@ -160,7 +152,6 @@ class CronTriggerManager:
|
|
|
160
152
|
try:
|
|
161
153
|
self.scheduler.remove_job(job_id)
|
|
162
154
|
del self.active_jobs[registration_id]
|
|
163
|
-
logger.info(f"✓ Unscheduled cron job for registration {registration_id}")
|
|
164
155
|
except Exception as e:
|
|
165
156
|
logger.error(f"Failed to unschedule cron job {job_id}: {e}")
|
|
166
157
|
raise
|
|
@@ -172,9 +163,6 @@ class CronTriggerManager:
|
|
|
172
163
|
registration_id = registration["id"]
|
|
173
164
|
cron_pattern = registration["resource"]["crontab"]
|
|
174
165
|
|
|
175
|
-
# Log immediately when callback is invoked to verify APScheduler is calling us
|
|
176
|
-
logger.info(f"Cron callback invoked for job {registration_id}")
|
|
177
|
-
|
|
178
166
|
execution = CronJobExecution(
|
|
179
167
|
registration_id=registration_id,
|
|
180
168
|
cron_pattern=cron_pattern,
|
|
@@ -183,13 +171,11 @@ class CronTriggerManager:
|
|
|
183
171
|
status="running"
|
|
184
172
|
)
|
|
185
173
|
|
|
186
|
-
logger.info(f"Executing cron job {registration_id} with pattern '{cron_pattern}'")
|
|
187
|
-
|
|
188
174
|
try:
|
|
189
175
|
agents_invoked = await self.execute_cron_job(registration)
|
|
190
176
|
execution.status = "completed"
|
|
191
177
|
execution.agents_invoked = agents_invoked
|
|
192
|
-
logger.info(f"✓ Cron job {registration_id} completed - invoked {agents_invoked}
|
|
178
|
+
logger.info(f"✓ Cron job {registration_id} completed successfully - invoked {agents_invoked} agent(s)")
|
|
193
179
|
|
|
194
180
|
except Exception as e:
|
|
195
181
|
execution.status = "failed"
|
|
@@ -206,9 +192,7 @@ class CronTriggerManager:
|
|
|
206
192
|
user_id = registration["user_id"]
|
|
207
193
|
|
|
208
194
|
# Get agent links
|
|
209
|
-
logger.info(f"Querying database for agents linked to cron job {registration_id}")
|
|
210
195
|
agent_links = await self.trigger_server.database.get_agents_for_trigger(registration_id)
|
|
211
|
-
logger.info(f"Found {len(agent_links) if agent_links else 0} agent links for cron job {registration_id}")
|
|
212
196
|
|
|
213
197
|
if not agent_links:
|
|
214
198
|
logger.warning(f"No agents linked to cron job {registration_id}")
|
|
@@ -235,7 +219,6 @@ class CronTriggerManager:
|
|
|
235
219
|
)
|
|
236
220
|
if success:
|
|
237
221
|
agents_invoked += 1
|
|
238
|
-
logger.info(f"✓ Invoked agent {agent_id} for cron job {registration_id}")
|
|
239
222
|
|
|
240
223
|
except Exception as e:
|
|
241
224
|
logger.error(f"✗ Error invoking agent {agent_id} for cron job {registration_id}: {e}")
|
{langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/.github/workflows/release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/core.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_trigger_server-0.2.4 → langchain_trigger_server-0.2.5}/langchain_triggers/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|