-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kirkbyers
committed
Mar 31, 2024
1 parent
91796e4
commit e587c93
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize)] | ||
enum JobType { | ||
SMScrape, | ||
Embed | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
enum JobStatus { | ||
Pending, | ||
Running, | ||
Completed, | ||
Failed | ||
} | ||
|
||
pub const INIT_TABLE: &str = r#" | ||
CREATE TABLE IF NOT EXISTS jobs ( | ||
id uuid NOT NULL PRIMARY KEY, | ||
type INTEGER NOT NULL, | ||
status INTEGER NOT NULL, | ||
created_at timestampz NOT NULL, | ||
updated_at timestampz NOT NULL, | ||
completed_at timestampz, | ||
); | ||
"#; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod sm_scrape; | ||
pub mod subscriptions; | ||
pub mod jobs; |