Skip to content

Commit

Permalink
Merge pull request #47 from realstorypro/running-readme
Browse files Browse the repository at this point in the history
updated the running readme
  • Loading branch information
Leonid Medovyy authored May 18, 2023
2 parents a430ed5 + c901316 commit 1b1bd50
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
3 changes: 1 addition & 2 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

vite: bin/vite dev
web: bin/rails s
web: bin/rails s -p 3000
worker: bundle exec sidekiq
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,53 @@ Log into your NextLeg account, navigate to your account settings, and update the
`https://custom_subdomain.ngrok.io/webhooks/midjourney`
## Running It
# Running It
Enterprise uses a series of jobs to automate the process of generating and publishing stories. These jobs can be scheduled to run automatically using a cron job or manually executed for setup and troubleshooting.
### Assembling
### Assembling Job
The Assembling Job is responsible for:
- Fetching new feed items from Feedly.
- Converting these feeds into stories and tweets with the help of OpenAI.
- Uploading new images to UploadCare.
To manually execute the Assembling Job, open your console and run the following command:
```ruby
AssembleJob.perform_now
```
### Dispensing
This command will immediately start the Assembling Job, allowing you to monitor its progress and troubleshoot any issues.
### Image Processing Job
The Image Processing Job is responsible for queuing up image ideas to Midjourney via NextLeg. __Before running this job, ensure that your proxy is set up correctly.__
To manually execute the Image Processing Job, open your console and run the following command:
```ruby
DispenseJob.perform_now
Images::ImagineImagesJob.perform_now
```
This command will immediately start the Image Processing Job, allowing you to monitor its progress and troubleshoot any issues.
### Publishing Job
The Publishing Job is responsible for:
_ Publishing discussions to StoryPro.
_ Scheduling tweets via Ayrshare.
To manually execute the Publishing Job, open your console and run the following command:
```ruby
Images::PublishJob.perform_now
```
This command will immediately start the Publishing Job, allowing you to monitor its progress and troubleshoot any issues.
## Scheduling Jobs
If you want to automate these jobs, you can schedule them to run at specific intervals using a cron job. To do this, you'll need to use the `rake simple_scheduler` command.
This command will start the Simple Scheduler, which will automatically execute the jobs according to the schedule defined in `config/simple_scheduler.yml` file.

## Local Setup

#### Mailcatcher
Is the best way to test emails in development. It catches all emails sent by your application and displays them in a web interface. You can also use it to test HTML emails during development.
## Mailcatcher
Mailcatcher is a useful tool for testing emails in development. It catches all emails sent by your application and displays them in a web interface. You can also use it to test HTML emails during development.

Install mailcatcher gem on OSX
```bash
Expand All @@ -119,4 +148,4 @@ Run mailcatcher
mailcatcher
```

The emails can be viewed at http://localhost:1080
You can then view the emails sent by your application by navigating to [http://localhost:1080](http://localhost:1080) in your web browser.

0 comments on commit 1b1bd50

Please sign in to comment.