Class: SubscribeJobState

Inherits:
ApplicationRecord show all
Defined in:
app/models/subscribe_job_state.rb

Overview

SubscribeJobState model. Each instance of this class represents an ocurrence of a user trying to subscribe to a feed.

Each SubscribeJobState belongs to a single user, and each user can have many SubscribeJobStates (one-to-many relationship).

The SubscribeJobState model has the following fields:

  • state: mandatory text that indicates the current state of the import process. Supported values are

“RUNNING” (the default), “SUCCESS” and “ERROR”.

  • fetch_url: URL of the feed, entered by the user.

  • feed_id: id of the subscribed feed; only different from nil if the state is SUCCESS.

Constant Summary collapse

RUNNING =

Class constants for the possible states

'RUNNING'
ERROR =
'ERROR'
SUCCESS =
'SUCCESS'