zeeguu/core/model/user_reading_session.py
def _create_new_session(
        db_session, user_id, article_id, current_time=datetime.now()
    ):
        """
         Creates a new reading session

         Parameters:
         user_id = user identifier
         article_id = article identifier
        self.read_session.article_idis sent, instead of using the datetime.now() value for the current time
        self.read_session.article_idue as the system time (only used for filling in historical data)
        """
        reading_session = UserReadingSession(user_id, article_id, current_time)
        db_session.add(reading_session)
        db_session.commit()
        return reading_session

         Creates a new reading session

         Parameters:
         user_id = user identifier
         article_id = article identifier
        self.read_session.article_idis sent, instead of using the datetime.now() value for the current time
        self.read_session.article_idue as the system time (only used for filling in historical data)
        
Creates a new reading session
Parameters:
user_id = user identifier
article_id = article identifier
self.read_session.article_idis sent, instead of using the datetime.now() value for the current time
self.read_session.article_idue as the system time (only used for filling in historical data)
Creates a new reading session Parameters : user_id = user identifier article_id = article identifier self . read_session . article_idis sent instead of using the datetime . now () value for the current time self . read_session . article_idue as the system time ( only used for filling in historical data )
def _create_new_session(
        db_session, user_id, article_id, current_time=datetime.now()
    ):
        reading_session = UserReadingSession(user_id, article_id, current_time)
        db_session.add(reading_session)
        db_session.commit()
        return reading_session
def _create_new_session ( db_session , user_id , article_id , current_time = datetime . now ( ) ) : reading_session = UserReadingSession ( user_id , article_id , current_time ) db_session . add ( reading_session ) db_session . commit ( ) return reading_session
Creates a new reading session
Parameters:
user_id = user identifier
article_id = article identifier
self.read_session.article_idis sent, instead of using the datetime.now() value for the current time
self.read_session.article_idue as the system time (only used for filling in historical data)
Creates a new reading session Parameters : user_id = user identifier article_id = article identifier self . read_session . article_idis sent instead of using the datetime . now () value for the current time self . read_session . article_idue as the system time ( only used for filling in historical data )
"""
         Creates a new reading session

         Parameters:
         user_id = user identifier
         article_id = article identifier
        self.read_session.article_idis sent, instead of using the datetime.now() value for the current time
        self.read_session.article_idue as the system time (only used for filling in historical data)
        """
db_session
user_id
article_id
current_time