<commit_before>module JellyfishOdl
  module Service
    class Server < ::Service::Compute
      def actions
        actions = super.merge :terminate

        # determine if action is available

        actions
      end

      def provision
        #   create key_pair name: service.uuid
        #   create security group (one per project) name: project-{id}
        #   create vpc (one per project) name: project-{id}
      end

      def start
      end

      def stop
      end

      def terminate
      end

      private

      def client
        @client ||= provider.settings
      end
    end
  end
end
<commit_msg>Change status to running after provision<commit_after>module JellyfishOdl
  module Service
    class Server < ::Service::Compute
      def actions
        actions = super.merge :terminate

        # determine if action is available

        actions
      end

      def provision
        # SUCCESS OR FAIL NOTIFICATION
        self.status = ::Service.defined_enums['status']['running']
        self.status_msg = 'running'
        self.save
      end

      def start
      end

      def stop
      end

      def terminate
      end

      private

      def client
        @client ||= provider.settings
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.05568814638027048, 'fraction_numerical': 0.0, 'mean_word_length': 1.7288503253796095, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7379991', 'n_tokens_mistral': 342, 'n_tokens_neox': 322, 'n_words': 113}